//
//  UIButton+GXCircleImageButton.m
//  GxLanOuProject
//
//  Created by 甘霞 on 15/10/26.
//  Copyright © 2015年 甘霞. All rights reserved.
//

#import "UIButton+GXCircleImageButton.h"


@implementation UIButton (GXCircleImageButton)

+ (UIButton *)initBtnWithFrame:(CGRect)frame
                           tag:(NSInteger)tag
                         image:(NSString *)imageName
                     addTarget:(id)target
                      selector:(SEL)selector {
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setFrame:frame];
    [button setBackgroundImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
    [button addTarget:self action:@selector(selector) forControlEvents:UIControlEventTouchUpInside];
    return button;
}

+ (UIButton *)initBtnWithFrame:(CGRect)frame
                           tag:(NSInteger)tag
                         image:(NSString *)imageName {
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setFrame:frame];
    [button setBackgroundImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
    return button;
}

@end
